2. The Basics

HTML Documents

HTML Headings

Defined with the <h1> to <h6> tags.

h1 is biggest

This is heading 1

h2 is smaller than h1 and so on..

This is heading 2

HTML Paragraphs

defined with the <p> tag.

HTML Links

defined with the <a> tag.
The link's destination is specified in the href (Hypertext REFerence) attribute.

Syntax:

<a href="Link">Text</a>

W3schools.com

HTML Images

<img> tag

Attributes:

source file (src), alternative text (alt), width, and height.

Syntax:
<img src="Image Location" alt="Name" width="Number" height="Number">

d4cf2736e20f6edddeb2d3d3cc3140cf.png

HTML Buttons

<button> tag

<button>Text on button</button>.

HTML Lists

defined with:

followed by <li> - list items tag.

Syntax:

<ul>

<li>List Item</li>

</ul>

For ordered list replace ul with ol.
It is also possible to nest ordered and unordered lists.

Unordered List

Ordered List

  1. HTML
  2. XML

Line Break

<br> tag.
It has no end tag or closing tag </>.

HTML elements with no content are called empty elements.

Example:

There is line break
here.

Note: HTML tags are not case sensitive: <P> is same as <p>